
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JLabel;


/**
 *
 * @author Luis
 */
public class MpegFile {
    Frame f=new Frame("Mpeg File Converter");
    JButton addf;
    public void ventanaMpg(){


        f.setLayout(null);
        
       addf=new JButton();
       ImageIcon img=new ImageIcon("recursos/addfiles.jpg");
       addf.setIcon(img);
       addf.setBounds(50,60, 55, 65);
       f.add(addf);


       JButton remov=new JButton();
       ImageIcon img2=new ImageIcon("recursos/remove.jpg");
       remov.setIcon(img2);
       remov.setBounds(130, 60, 55, 65);
       f.add(remov);
       
       JButton conver=new JButton();
       ImageIcon im3=new ImageIcon("recursos/conver.jpg");
       conver.setIcon(im3);
       conver.setBounds(210, 60, 55, 65);
       f.add(conver);

       JButton sett=new JButton();
       ImageIcon im4=new ImageIcon("recursos/setting.jpg");
       sett.setIcon(im4);
       sett.setBounds(290, 60, 55, 65);
       f.add(sett);
       
       JButton about=new JButton();
       ImageIcon im5=new ImageIcon("recursos/abou.jpg");
       about.setIcon(im5);
       about.setBounds(370, 60, 50, 65);
       f.add(about);

       about.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
               About a=new About();
               a.ventanaAbout();
               f.hide();
            }
        });
       JButton home=new JButton();
       ImageIcon im6=new ImageIcon("recursos/home.jpg");
       home.setIcon(im6);
       home.setBounds(450, 60, 50, 65);
       f.add(home);

       JButton help=new JButton();
       ImageIcon im7=new ImageIcon("recursos/help.jpg");
       help.setIcon(im7);
       help.setBounds(530, 60, 55, 65);
       f.add(help);

       JButton exit=new JButton();
       ImageIcon im8=new ImageIcon("recursos/exit.jpg");
       exit.setIcon(im8);
       exit.setBounds(610, 60, 55, 65);
       f.add(exit);
       exit.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
               
                f.dispose();
                UltraDvd ul=new UltraDvd();
                ul.principal();
                
                f.hide();

            }
        });
      
       TextField tf=new TextField("Source video Files");
       tf.setBounds(50, 140 , 390, 160);
       f.add(tf);
       TextField tf2=new TextField("Resolucion ");
       tf2.setBounds(440, 140 , 80, 160);
       f.add(tf2);
       TextField tf3=new TextField("Start Time ");
       tf3.setBounds(520, 140 , 80, 160);
       f.add(tf3);
       TextField tf4=new TextField("End Time");
       tf4.setBounds(600, 140 , 80, 160);
       f.add(tf4);
       TextField tf5=new TextField("Status");
       tf5.setBounds(660, 140 , 80, 160);
       f.add(tf5);

       Label l=new Label("OutPut Folder");
       l.setBounds(50, 315, 78, 15);
       f.add(l);
       TextField fl=new TextField();
       fl.setBounds(150, 315, 400, 18);
       f.add(fl);
       JButton change=new JButton("Change");
       change.setBounds(550, 315, 80, 18);
       f.add(change);

       JButton open=new JButton("Open");
       open.setBounds(640, 315, 80, 18);
       f.add(open);
       Label l2=new Label("OutPut Format");
       l2.setBounds(50, 335, 82, 15);
       f.add(l2);
       
       TextField fo=new TextField();
       fo.setBounds(150, 335, 450, 18);
       f.add(fo);
       JButton advan=new JButton("Advance");
       advan.setBounds(605, 335, 85, 18);
       f.add(advan);
       
       Label l3=new Label("Video Quality:");
       l3.setBounds(50, 355, 82, 15);
       f.add(l3);

       String [] quality={"High","Normal","Good","Low"};
       JComboBox cb1=new JComboBox(quality);
       cb1.setBounds(150, 355, 82, 18);
       f.add(cb1);

       Label l4=new Label("Audio Quality:");
       l4.setBounds(290, 355, 90, 15);
       f.add(l4);

       String audio[]={"High","Normal","Good","Low"};
       JComboBox cb2=new JComboBox(audio);
       cb2.setBounds(380, 355, 82, 18);
       f.add(cb2);

       Label l8=new Label("TV type");
       l8.setBounds(550, 355, 90, 15);
       f.add(l8);

       String type[]={"NTSC","PAL"};
       JComboBox cm4=new JComboBox(type);
       cm4.setBounds(640, 355, 90, 18);
       f.add(cm4);

       Label l5=new Label("Width/Height");
       l5.setBounds(50, 375, 82, 15);
       f.add(l5);

       String Width[]={"352x240"};
       JComboBox cb3=new JComboBox(Width);
       cb3.setBounds(150, 375, 82, 18);
       f.add(cb3);

       Label l6=new Label("Aspect Radio:");
       l6.setBounds(290, 375, 82, 15);
       f.add(l6);

       String aspect[]={"4:3(StandarTV)","4:3(Standar Wide)"};
       JComboBox cb4=new JComboBox(aspect);
       cb4.setBounds(380, 375, 90, 18);
       f.add(cb4);

       Checkbox ch=new Checkbox();
       ch.setBounds(550,375,20,20);
       f.add(ch);

       Label l7=new Label("Add letter box to keep aspect ratio");
       l7.setBounds(570, 375 , 200 , 18);
       f.add(l7);

       JButton stop=new JButton("Stop");
       stop.setBounds(680, 410, 60, 25);
       f.add(stop);


       f.addWindowListener(new WindowAdapter() {
       public void windowClosing(WindowEvent e){
           System.exit(0);
       }
       });
       f.setBackground(Color.LIGHT_GRAY);
       f.setVisible(true);
       f.setSize(800, 500);
       f.setResizable(false);
       f.setLocation(200, 150);
    }
    public static void main(String[] args) {
        MpegFile mp=new MpegFile();
        mp.ventanaMpg();
    }

 
}
